﻿using System;
using System.Windows.Forms;


namespace TestWindows
{
    static class Program
    {

        /*
         http://books.google.com.ar/books?id=rtdgHbMeTBMC&pg=PA236&lpg=PA236&dq=entity+framework+sql+parser&source=bl&ots=kWpg3AKzZG&sig=bX2Kwe3NSXSg1WT3JaY-zdJCXDA&hl=es-419&sa=X&ei=y0sZVMCnE9e8ggTY8YDAAQ&sqi=2&ved=0CEIQ6AEwBA#v=onepage&q=entity%20framework%20sql%20parser&f=false
         */

        /*
                 using (AdventureWorksEntities context =
            new AdventureWorksEntities())
        {
            string queryString =
                @"SELECT VALUE contact FROM AdventureWorksEntities.Contacts 
                    AS contact WHERE contact.FirstName = @fn";

            ObjectQuery<Contact> contactQuery =
                context.CreateQuery<Contact>(queryString,
                    new ObjectParameter("fn", "Frances"));

            // Iterate through the collection of Contact items. 
            foreach (Contact result in contactQuery)
                Console.WriteLine("First Name: {0}, Last Name: {1}",
                result.FirstName, result.LastName);
        }
         * 
         * 
         * 
         Ejemplos 
         * http://interactiveasp.net/blogs/natesstuff/archive/2008/11/02/linq-to-entities-example-queries.aspx
         *
         * 
         // Eager Loading with Object Services
using (AdventureWorksEntities data = new AdventureWorksEntities()) {
    ObjectQuery<Customer> custs = data.CreateQuery<Customer>(
        "SELECT VALUE c FROM Customer AS c WHERE c.State = @state",
        new ObjectParameter("state", "UT")).Include("SalesOrderHeader"); 
         
        */

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            InitializeManagers();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

        static void InitializeManagers()
        {
            //DataAccess.DataAccessProvider = new EntityFrameworkProvider("MarketEntities");
            //DataAccess.DataAccessProvider = new EntityFrameworkProvider("DeviceNetworkEntities");
            
        }
    }
}
